package oo5;

import oo4.Dog;
import oo4.Penguin;
import oo4.Pet;

//宠物医生
public class PetDoctor {
	private String name, tel;

	public PetDoctor(String n) {
		name = n;
	}

	// 给宠物看病
	//
	public void cure(Pet d) {
		d.show();
		// 如果是老虎，把嘴捆起来
		if (d instanceof Tiger) {
			System.out.println("把嘴捆起来");
		}
		//
		System.out.println(name + "在给" + d.getName() + "检查");
		System.out.println(name + "观察他的饮食：");
		d.eat();
		if (d.getHealth() < 60) {
			System.out.println("量体温，测血压");
			System.out.println("吃药打针，花费1888");
			d.setHealth(d.getHealth() + 20);
			System.out.println(d.getName() + "康复了.健康值：" + d.getHealth());
		} else {
			System.out.println(d.getName() + "很健康，没病");
		}

	}
//

//	public void cure(Dog d) {
//		System.out.println(name + "在给" + d.getName() + "看病");
//
//		System.out.println("量体温，测血压");
//		System.out.println("吃药打针，花费1888");
//		d.setHealth(d.getHealth() + 20);
//		System.out.println(d.getName() + "康复了");
//	}
//
//	public void cure(Penguin d) {
//		System.out.println(name + "在给" + d.getName() + "看病");
//
//		System.out.println("量体温，测血压");
//		System.out.println("吃药打针，花费1888");
//		d.setHealth(d.getHealth() + 20);
//		System.out.println(d.getName() + "康复了");
//	}
//
//	public void cure(Myna d) {
//		System.out.println(name + "在给" + d.getName() + "看病");
//
//		System.out.println("量体温，测血压");
//		System.out.println("吃药打针，花费1888");
//		d.setHealth(d.getHealth() + 20);
//		System.out.println(d.getName() + "康复了");
//	}
}
